package com.test.annotation;

import java.lang.reflect.Method;

/**
 * Created by jl on 2016/4/21.
 */
public class AnnExecutor {
    public static void processAnn(Object obj) {
        Class<?> cl = obj.getClass();
        for (Method m : cl.getDeclaredMethods()) {
            SaySomeTh s = m.getAnnotation(SaySomeTh.class);
            if (s != null) {
                System.out.println(s.sth());
            }
        }
    }
}
